// 选框的点击效果
let flag = true
$('.chiose-label').click(function () {
    if (flag) {
        $('.chiose-label img').attr('src', './images/myClass/checked.png')
        flag = false
    } else {
        $('.chiose-label img').attr('src', './images/myClass/unchecked.png')
        flag = true
    }
})
// 发布作业
$('.submit-vote').click(() => {
    let data = $('form').serialize()
    $.ajax({
        type: 'post',
        url: '/publishHomework',
        data: data,
        success: function (result) {
            if (result.msg == '发布成功') {
                alert(result.msg)
                location.href = '/myClassBlog'
            }
        }
    })
})